Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
this.connect('destroy', this._onDestroy.bind(this));
parentActor.add_child(this);
- this._userManager = AccountsService.UserManager.get_default()
+ this._userManager = AccountsService.UserManager.get_default();
this._gdmClient = new Gdm.Client();
this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
this._aggregateProvider = Provider(Gio.DBus.system,
'org.freedesktop.realmd',
'/org/freedesktop/realmd',
- this._reloadRealms.bind(this))
+ this._reloadRealms.bind(this));
this._realms = {};
this._signalId = this._aggregateProvider.connect('g-properties-changed',
this._updateLoginFormat();
}
};
-Signals.addSignalMethods(Manager.prototype)
+Signals.addSignalMethods(Manager.prototype);
var DISABLE_USER_LIST_KEY = 'disable-user-list';
// Give user 48ms to read each character of a PAM message
-var USER_READ_TIME = 48
+var USER_READ_TIME = 48;
var MessageType = {
NONE: 0,
try {
let [ok, bytes] = f.load_contents(null);
if (bytes instanceof Uint8Array)
- xml = imports.byteArray.toString(bytes)
+ xml = imports.byteArray.toString(bytes);
else
xml = bytes.toString();
} catch (e) {
this._context = null;
this._hints = 0;
this._purpose = 0;
- this._preeditStr = ''
+ this._preeditStr = '';
this._preeditPos = 0;
this._preeditVisible = false;
}
} else {
let [bandClass, band, sid] = result;
- this.operator_name = _findProviderForSid(sid)
+ this.operator_name = _findProviderForSid(sid);
}
this.emit('notify::operator-name');
});
'org.freedesktop.impl.portal.PermissionStore',
'/org/freedesktop/impl/portal/PermissionStore',
initCallback, cancellable);
-};
+}
let themeNode = this.get_theme_node();
let offY = this._computeBoxPointerOffset();
- this.translation_x = themeNode.get_length('-shell-close-overlap-x')
+ this.translation_x = themeNode.get_length('-shell-close-overlap-x');
this.translation_y = themeNode.get_length('-shell-close-overlap-y') + offY;
}
geditStartTime:
{ description: "Time from gedit launch to window drawn",
units: "us" },
-}
+};
function waitAndDraw(milliseconds) {
let cb;
// usual hack for the usual bug in ClutterBinLayout...
x_expand: true,
y_expand: true });
-};
+}
function getWindows(workspace) {
// We ignore skip-taskbar windows in switchers, but if they are attached
_onDestroy() {
this.window = null;
}
-};
+}
// We don't show an actual popup, so just provide what SwitcherPopup
// expects instead of inheriting from SwitcherList
this.icons.push(icon);
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
- this._removeWindow(window)
+ this._removeWindow(window);
});
}
childBox.y1 = childBox.y2 - this._label.height;
this._label.allocate(childBox, flags);
- let totalLabelHeight = this._label.height + themeNode.get_padding(St.Side.BOTTOM)
+ let totalLabelHeight = this._label.height + themeNode.get_padding(St.Side.BOTTOM);
childBox.x1 = box.x1;
childBox.x2 = box.x2;
childBox.y1 = box.y1;
Tweener.addTween(this._grid, params);
}
-};
+}
Signals.addSignalMethods(BaseAppView.prototype);
var AllView = class AllView extends BaseAppView {
this._controls.opacity = 0;
finalOpacity = 255;
} else {
- finalOpacity = 0
+ finalOpacity = 0;
}
Tweener.addTween(this._controls,
}
});
}
-};
+}
Signals.addSignalMethods(AppFavorites.prototype);
var appFavoritesInstance = null;
}
_openSettings() {
- let desktopFile = 'gnome-sound-panel.desktop'
+ let desktopFile = 'gnome-sound-panel.desktop';
let app = Shell.AppSystem.get_default().lookup_app(desktopFile);
if (!app) {
this._barLevelWidth = 0;
if (params == undefined)
- params = {}
+ params = {};
this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel',
can_focus: params['canFocus'] || false,
cr.lineTo(x1 - rise, y1);
cr.lineTo(x1 + borderRadius, y1);
} else if (skipBottomLeft) {
- cr.lineTo(x1 - rise, y2)
+ cr.lineTo(x1 - rise, y2);
cr.lineTo(x1 - rise, y2 - halfBase);
} else {
cr.lineTo(x1, this._arrowOrigin + halfBase);
this._sourceActorDestroyId = this._sourceActor.connect('destroy', () => {
this._sourceActor = null;
delete this._sourceActorDestroyId;
- })
+ });
}
}
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
-var FROZEN_WINDOW_BRIGHTNESS = -0.3
-var DIALOG_TRANSITION_TIME = 0.15
+var FROZEN_WINDOW_BRIGHTNESS = -0.3;
+var DIALOG_TRANSITION_TIME = 0.15;
var ALIVE_TIMEOUT = 5000;
var CloseDialog = GObject.registerClass({
GLib.source_remove(this._timeoutId);
this._timeoutId = 0;
- global.display.disconnect(this._windowFocusChangedId)
+ global.display.disconnect(this._windowFocusChangedId);
this._windowFocusChangedId = 0;
global.stage.disconnect(this._keyFocusChangedId);
log('keyringPrompt: Failed to show modal dialog.' +
' Dismissing prompt request');
- this.prompt.cancel()
+ this.prompt.cancel();
return false;
}
break;
default:
log('Invalid connection type: ' + connectionType);
- };
+ }
return content;
}
userName = userNames[0];
this._user = AccountsService.UserManager.get_default().get_user(userName);
- let userRealName = this._user.get_real_name()
+ let userRealName = this._user.get_real_name();
this._userLoadedId = this._user.connect('notify::is_loaded',
this._onUserChanged.bind(this));
this._userChangedId = this._user.connect('changed',
let itemHeight = this.allocation.y2 - this.allocation.y1;
let labelHeight = this.label.get_height();
- let yOffset = Math.floor((itemHeight - labelHeight) / 2)
+ let yOffset = Math.floor((itemHeight - labelHeight) / 2);
let y = stageY + yOffset;
this._calendar.connect('selected-date-changed', (calendar, date) => {
// Make the button reactive only if the selected date is not the
// current date.
- this.actor.reactive = !_isToday(date)
+ this.actor.reactive = !_isToday(date);
});
}
params['onCompleteParams'] = [this._dragActor, eventTime];
// start the animation
- Tweener.addTween(this._dragActor, params)
+ Tweener.addTween(this._dragActor, params);
}
_finishAnimation() {
if (!this._animationInProgress)
- return
+ return;
this._animationInProgress = false;
if (!this._buttonDown)
case Clutter.ScrollDirection.DOWN:
this.emit('cursor-down');
break;
- };
+ }
return Clutter.EVENT_PROPAGATE;
});
function clamp(value, min, max) {
return Math.max(Math.min(value, max), min);
-};
+}
function zoomOutActor(actor) {
let actorClone = new Clutter.Clone({ source: actor,
let childVolume = child.get_transformed_paint_volume(this);
if (!childVolume)
- return false
+ return false;
paintVolume.union(childVolume);
}
if (!this._nPages)
return 0;
- let firstPageItem = pageNumber * this._childrenPerPage
+ let firstPageItem = pageNumber * this._childrenPerPage;
let childBox = this._getVisibleChildren()[firstPageItem].get_allocation_box();
return childBox.y1 - this.topPadding;
}
}
_press(key) {
- this.emit('activated')
+ this.emit('activated');
if (key != this.key || this._extended_keys.length == 0) {
this.emit('pressed', this._getKeyval(key), key);
_onPanEnd() {
if (Math.abs(this._delta) < this.actor.width * PANEL_SWITCH_RELATIVE_DISTANCE) {
- this._onPanCancel()
+ this._onPanCancel();
} else {
let value;
if (this._delta > 0)
let section = this._sections[i];
key = new Key(section.label, []);
- key.connect('released', () => { this._emojiPager.setCurrentSection(section, 0) });
+ key.connect('released', () => { this._emojiPager.setCurrentSection(section, 0); });
row.appendKey(key.actor);
section.button = key;
purpose == Clutter.InputContentPurpose.PHONE)
keypadVisible = true;
- this.emit('emoji-visible', emojiVisible)
+ this.emit('emoji-visible', emojiVisible);
this.emit('keypad-visible', keypadVisible);
}
getGroups() {
let inputSources = this._inputSourceManager.inputSources;
- let groups = []
+ let groups = [];
for (let i in inputSources) {
let is = inputSources[i];
const Main = imports.ui.main;
const LOCATE_POINTER_KEY = "locate-pointer";
-const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface"
+const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface";
var LocatePointer = class {
constructor() {
time: OPEN_AND_CLOSE_TIME,
transition: 'easeOutQuad',
onComplete: this._closeComplete.bind(this)
- })
+ });
else
this._closeComplete();
}
// There's already a pending call to GetConnectionUnixProcessID,
// which will see the new notification data when it finishes,
// so we don't have to do anything.
- return invocation.return_value(GLib.Variant.new('(u)', [id]));;
+ return invocation.return_value(GLib.Variant.new('(u)', [id]));
}
this._busProxy.GetConnectionUnixProcessIDRemote(sender, (result, excp) => {
SlideDirection.RIGHT : SlideDirection.LEFT;
return direction;
-};
+}
var SlideDirection = {
LEFT: 0,
this.actor.set_child(box);
this._label = new St.Label({ style_class: 'combo-box-label' });
- box.add_child(this._label)
+ box.add_child(this._label);
let arrow = new St.Icon({ style_class: 'popup-menu-arrow',
icon_name: 'pan-down-symbolic',
// I miss Cairo.Matrix
let dimensions = this._handle.get_dimensions();
x = x * this._scale + this._actorWidth / 2 - dimensions.width / 2 * this._scale;
- y = y * this._scale + this._actorHeight / 2 - dimensions.height / 2 * this._scale;;
+ y = y * this._scale + this._actorHeight / 2 - dimensions.height / 2 * this._scale;
return [Math.round(x), Math.round(y)];
}
pos.y = this._imageHeight - pos.y;
}
- let [x, y] = this._transformPoint(pos.x, pos.y)
+ let [x, y] = this._transformPoint(pos.x, pos.y);
return [true, x, y, direction];
}
_updatePadChooser() {
if (this._groupPads.length > 1) {
if (this._padChooser == null) {
- this._padChooser = new PadChooser(this.padDevice, this._groupPads)
+ this._padChooser = new PadChooser(this.padDevice, this._groupPads);
this._padChooser.connect('pad-selected', (chooser, pad) => {
this._requestForOtherPad(pad);
});
if (this._followUpActionEdition(str))
return;
- this._padDiagram.stopEdition(false, str ? str : _("None"))
+ this._padDiagram.stopEdition(false, str ? str : _("None"));
this._editedAction = null;
}
green: _norm(color.green * color.alpha),
blue: _norm(color.blue * color.alpha),
alpha: color.alpha });
-};
+}
function _unpremultiply(color) {
if (color.alpha == 0)
let blue = Math.min((color.blue * 255 + 127) / color.alpha, 255);
return new Clutter.Color({ red: red, green: green,
blue: blue, alpha: color.alpha });
-};
+}
class AppMenu extends PopupMenu.PopupMenu {
constructor(sourceActor) {
_getDraggableWindowForPosition(stageX) {
let workspaceManager = global.workspace_manager;
- let workspace = workspaceManager.get_active_workspace()
+ let workspace = workspaceManager.get_active_workspace();
let allWindowsByStacking = global.display.sort_windows_by_stacking(
workspace.list_windows()
).reverse();
metaWindow.showing_on_its_workspace() &&
metaWindow.get_window_type() != Meta.WindowType.DESKTOP &&
metaWindow.maximized_vertically &&
- stageX > rect.x && stageX < rect.x + rect.width
+ stageX > rect.x && stageX < rect.x + rect.width;
});
}
});
time: duration / 1000,
transition: 'easeOutQuad',
onUpdateScope: this,
- onUpdate() { this.queue_repaint() },
+ onUpdate() { this.queue_repaint(); },
onCompleteScope: this,
onComplete() { this.stop(); }
});
this.label = new St.Label({ text: text });
this.add_child(this.label);
- this.label_actor = this.label
+ this.label_actor = this.label;
}
});
lock(animate) {
if (this._lockSettings.get_boolean(DISABLE_LOCK_KEY)) {
- log('Screen lock is locked down, not locking') // lock, lock - who's there?
+ log('Screen lock is locked down, not locking'); // lock, lock - who's there?
return;
}
_createScreenshot(invocation, needsDisk=true) {
let lockedDown = false;
if (needsDisk)
- lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk')
+ lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk');
let sender = invocation.get_sender();
if (this._screenShooter.has(sender) || lockedDown) {
let [success, entryX, entryY] = entry.transform_stage_point(stageX, 0);
if (success)
entry.menu.setSourceAlignment(entryX / entry.width);
-};
+}
function _onButtonPressEvent(actor, event, entry) {
if (entry.menu.isOpen) {
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;
-};
+}
function _onPopup(actor, entry) {
let [success, textX, textY, lineHeight] = entry.clutter_text.position_to_coords(-1);
if (success)
entry.menu.setSourceAlignment(textX / entry.width);
entry.menu.open(BoxPointer.PopupAnimation.FULL);
-};
+}
function addContextMenu(entry, params) {
if (entry.menu)
canFocus: true,
reactive: true,
accessibleRole: Atk.Role.SLIDER,
- }
- super(value, params)
+ };
+ super(value, params);
this.actor.connect('button-press-event', this._startDragging.bind(this));
this.actor.connect('touch-event', this._touchDragging.bind(this));
this._device.get_path(), accessPoints[0].get_path()]);
} else {
let connection = new NM.SimpleConnection();
- this._client.add_and_activate_connection_async(connection, this._device, accessPoints[0].get_path(), null, null)
+ this._client.add_and_activate_connection_async(connection, this._device, accessPoints[0].get_path(), null, null);
}
}
this._item.icon.icon_name = icon;
// The icon label
- let label
+ let label;
if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED)
label = _("%d\u2009%%").format(100);
else
focusCallback: () => {
this._a11yFocusPage(page);
}
- });;
+ });
page.hide();
this.actor.add_actor(page);
return page;
this._activePage == this._workspacesPage &&
!Main.overview.animationInProgress) {
this.appDisplay.animate(IconGrid.AnimationDirection.OUT, () => {
- this._animateIn(oldPage)
+ this._animateIn(oldPage);
});
} else {
this._fadePageOut(page);
this.emit('page-changed');
if (oldPage)
- this._animateOut(oldPage)
+ this._animateOut(oldPage);
else
this._animateIn();
}
_getTitleAndBanner(app, window) {
let title = app.get_name();
let banner = _("“%s” is ready").format(window.get_title());
- return [title, banner]
+ return [title, banner];
}
_onWindowDemandsAttention(display, window) {
let updateUnfullscreenGesture = () => {
let currentWindow = global.display.focus_window;
topDragAction.enabled = currentWindow && currentWindow.is_fullscreen();
- }
+ };
global.display.connect('notify::focus-window', updateUnfullscreenGesture);
global.display.connect('in-fullscreen-changed', updateUnfullscreenGesture);
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
this._currentPadOsd = new PadOsd.PadOsd(device, settings, imagePath, editionMode, monitorIndex);
- this._currentPadOsd.connect('closed', () => { this._currentPadOsd = null });
+ this._currentPadOsd.connect('closed', () => { this._currentPadOsd = null; });
return this._currentPadOsd.actor;
}
// keep track how much smaller the grid becomes due to scaling
// so it can be centered again
- let compensation = 0
+ let compensation = 0;
let y = 0;
for (let i = 0; i < rows.length; i++) {
// height would undo what vertical scaling is trying to achieve.
}
- row.x = area.x + (Math.max(area.width - (widthWithoutSpacing * row.additionalScale + horizontalSpacing), 0) / 2)
+ row.x = area.x + (Math.max(area.width - (widthWithoutSpacing * row.additionalScale + horizontalSpacing), 0) / 2);
row.y = area.y + (Math.max(area.height - (heightWithoutSpacing + verticalSpacing), 0) / 2) + y;
y += row.height * row.additionalScale + this._rowSpacing;
}
let [r, x, y] = this.transform_stage_point(stageX, stageY);
for (let i = 0; i < this._thumbnails.length; i++) {
- let thumbnail = this._thumbnails[i]
+ let thumbnail = this._thumbnails[i];
let [w, h] = thumbnail.actor.get_transformed_size();
if (y >= thumbnail.actor.y && y <= thumbnail.actor.y + h) {
thumbnail.activate(time);
break;
} else if (y > targetBottom && y <= nextTargetTop) {
this._dropWorkspace = i;
- break
+ break;
}
targetBase = nextTargetBase;
for (let i = 0; i < BOX_WIDTHS.length; i++) {
let child = new St.Bin({ width: BOX_WIDTHS[i], height: BOX_HEIGHT,
- style: 'border: 1px solid #444444; background: #00aa44' })
+ style: 'border: 1px solid #444444; background: #00aa44' });
this.add_actor(child);
}
}